/*******************************************************************************
 * Copyright (c) 2025 Lablicate GmbH.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 * Matthias Mailänder - initial API and implementation
 *******************************************************************************/
package org.eclipse.chemclipse.xxd.identifier.supplier.wikidata.query;

import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Version;

public abstract class AbstractQuery {

	public static String getUserAgent() {

		IProduct product = Platform.getProduct();
		if(product == null) {
			return "JUnit/4";
		}

		Version version = product.getDefiningBundle().getVersion();
		return product.getName() + "/" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro();
	}
}
